package com.zhanggm.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhanggm.entity.User;
import com.zhanggm.mapper.UserMapper;
import com.zhanggm.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zhanggm
 * @since 2020-05-21
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    /**
     * 分页查询
     * @param pageNum
     * @param pageSize
     * @param user
     * @return
     */
    public IPage<User> getPageInfo(Integer pageNum,Integer pageSize, User user){
        return this.getBaseMapper().getPageInfo(new Page(pageNum,pageSize),user);
    }
}
